package per.wsj.paging;

import androidx.annotation.NonNull;
import androidx.paging.DataSource;

public class CustomPageDataSourceFactory extends DataSource.Factory<Integer, StudentModel> {

    private CustomRepository mCustomRepository;

    public CustomPageDataSourceFactory(CustomRepository mCustomRepository) {
        this.mCustomRepository = mCustomRepository;
    }

    @NonNull
    @Override
    public DataSource<Integer, StudentModel> create() {
        return new CustomPageDataSource(mCustomRepository);
    }
}
